home *** CD-ROM | disk | FTP | other *** search
- on ChangeDisplaySetting
- global gOrigScreenDisplay, gCurrentScreenDisplay
- gOrigScreenDisplay = []
- gOrigScreenDisplay = dosGetDisplay()
- put "gOrigScreenDisplay = " & gOrigScreenDisplay
- modeFound = 0
- i = 1
- repeat while not modeFound
- gCurrentScreenDisplay = dosGetDisplayMode(i)
- i = i + 1
- if gCurrentScreenDisplay = VOID then
- exit
- end if
- if ilk(gCurrentScreenDisplay, #list) = 0 then
- exit
- end if
- if gCurrentScreenDisplay = [] then
- exit repeat
- end if
- if gCurrentScreenDisplay[1] = 800 then
- if (gCurrentScreenDisplay[4] > 55) or (gCurrentScreenDisplay[4] = 0) then
- bitTarget = 32
- repeat while bitTarget > 8
- testDepth = dosSetDisplay(gCurrentScreenDisplay[1], gCurrentScreenDisplay[2], bitTarget, gCurrentScreenDisplay[4], "Test")
- if testDepth then
- gCurrentScreenDisplay[3] = bitTarget
- modeFound = 1
- exit repeat
- next repeat
- end if
- bitTarget = bitTarget - 8
- end repeat
- if modeFound then
- exit repeat
- end if
- end if
- end if
- end repeat
- if not modeFound then
- put "No compatible display mode was found on the system."
- exit
- end if
- x1 = dosSetDisplay(gCurrentScreenDisplay[1], gCurrentScreenDisplay[2], gCurrentScreenDisplay[3], gCurrentScreenDisplay[4], "Test")
- if x1 then
- Success = dosSetDisplay(gCurrentScreenDisplay[1], gCurrentScreenDisplay[2], gCurrentScreenDisplay[3], gCurrentScreenDisplay[4], "Temporary")
- end if
- if not Success then
- put "Can't set the display setting, error # " & dosGetLastError()
- end if
- put "gCurrentScreenDisplay = " & gCurrentScreenDisplay
- end
-